package com.booksystem.campuslibrarymanagementsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.booksystem.campuslibrarymanagementsystem.commen.request.userquest.Feedbackquest.Feedback;
import com.booksystem.campuslibrarymanagementsystem.entity.FeedbacksTable;
import com.booksystem.campuslibrarymanagementsystem.mapper.FeedbacksTableMapper;
import com.booksystem.campuslibrarymanagementsystem.service.FeedbacksTableService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FeedbacksTableServiceImpl extends ServiceImpl<FeedbacksTableMapper, FeedbacksTable>implements FeedbacksTableService {
    @Autowired
    FeedbacksTableMapper feedbacksTableMapper;

    @Override
    public boolean upDataState(int id, String accountid, String state) {
        return feedbacksTableMapper.upDataState(id,accountid,state);
    }

    @Override
    public FeedbacksTable queryById(int id) {
        return feedbacksTableMapper.queryById(id);
    }
    @Override
    public int saveb(FeedbacksTable fee){
        return feedbacksTableMapper.saveb(fee);
    }

    @Override
    public List<FeedbacksTable> selectByaccount(@Param("account") String account){
        return  feedbacksTableMapper.selectByaccount(account);
    }

    @Override
    public  int deleteFeedbackid(@Param("account") String account,@Param("id") int id){
        return feedbacksTableMapper.deleteFeedbackid(account,id);
    }
}
